package context

import "github.com/gookit/validate"

type SysRoleMenuContext struct {
	RoleId  uint   `json:"roleId" validate:"required"`
	MenuIds string `json:"menuIds" validate:"required"`
}

// Messages 您可以自定义验证器错误消息
func (f SysRoleMenuContext) Messages() map[string]string {
	return validate.MS{
		"required": "{field}不能为空",
	}
}

// Translates 你可以自定义字段翻译
func (f SysRoleMenuContext) Translates() map[string]string {
	return validate.MS{
		"RoleId":  "角色ID",
		"MenuIds": "菜单ID",
	}
}
